Skip to main content

Visual Studio

Adding LightningChart components to Visual Studio Toolbox

Warning

Applies to .NET Framework only. Currently Visual Studio (2022 17.8) does not support Controls/Toolbox Deployment through DLL-reference for .NET (5, 6, 7, 8) projects. Therefore, LightningChart .NET 6.0 controls cannot be installed to the toolbox the same way as for .NET Framework. This is not LightningChart specific, and affects any custom-control.
However, this limitation does not prevent LightningChart control usage. The references can be added manually, and the chart created in the code.

During installation LightningChart components automatically added Visual Studio Toolbox. Once you open/create .NET Framework application (WinForms and WPF) Visual Studio Toolbox will show controls which could be used in the project. However, dragging and dropping from Toolbox is not required - the chart could be created and configured in code (as demonstrated in our Interactive Examples App and code sample).

Note, LightningChart will not appear in Visual Studio toolbox for projects targeting .NET Core 3 or higher (e.g. .NET 6.0).

If for some reason LightningChart .NET control was not added in the Visual Studio toolbox (for .NET Framework application) or user wants to add it manually, then following paragraph will explain how to do it.

Winforms

  1. Open Visual studio. Create a new WinForms project. Right-click on Toolbox, select Add Tab and give name "LightningChart"

  2. Right-click on LightningChart tab, and select Choose items...

  3. In Choose Toolbox items window, Select .NET Framework Components page. Click Browse... Browse LightningChart.WinForms.Charting.NET4.dll and LightningChart.WinForms.SignalTools.NET4.dll, from the folder the components were installed on, typically C:\Program Files\LightningChart\LightningChart .NET SDK v.12\LibNET4, and click open. The components can now be found in the toolbox.

WPF

  1. Open Visual studio. Create a new WPF project. Right-click on Toolbox, select Add Tab and give name "LightningChart"

  2. Right-click on LightningChart tab, and select Choose items...

  3. In Choose Toolbox items window, Select WPF Components page. Click Browse... Browse LightningChart.WPF.Charting.NET4.dll, LightningChart.WPF.ChartingMVVM.NET4, and LightningChart.WPF.SignalTools.NET4.dll, from the folder the components were installed to, typically C:\Program Files\LightningChart\LightningChart .NET SDK v.12\LibNET4, and click open. The components can be now found in the toolbox.

Configuring Visual Studio 2010-2022 help manually

This chapter gives the information how to install LightningChart® .NET help content manually. This information is needed if Visual Studio 2010-2022 does not have any local help content installed. When installing LightningChart® .NET and there isn’t any local help content installed, LightningChart® .NET’s help will not be added.

These steps allow to view LightningChart® .NET’s help from Visual Studio 2010-2022. Either press F1 on LightningChart’s classes, properties etc. or use Microsoft Help Viewer to browse the help content.

Visual Studio 2010

Follow these steps to manually install LightningChart® .NET help content on Visual Studio 2010:

  1. Open Visual Studio 2010.

  2. Select Help -> Manage Help Settings.

  3. On Help Library Manager, click Settings link.

  4. Make sure that I want to use local help is selected.

  5. If I want to use local help is selected, click Cancel to go back to Help Library Manager. Otherwise click OK.

  6. Click Install content from disk link.

  7. Click Browse button and go to the folder where LightningChart® .NET is installed, by default the path is C:\Program Files\LightningChart\LightningChart .NET SDK v.12\MSHelpViewer.

  8. Select HelpContentSetup.msha and click Open button.

  9. Click Next button.

  10. Next to LightningChart® .NET Help there is Add link. Click it and make sure that Status column value changes to Update Pending.

  11. Click Update button. If Help Library Manager asks if you want to proceed, click Yes button. Help library update begins.

  12. After help library is updated, click Finish button to close Help Library Manager.

Visual Studio 2012-2022

Follow these steps to manually install LightningChart® .NET help content on Visual Studio 2012- 2022:

  1. Open Visual Studio 2012, 2013, 2015, 2017, 2019 or 2022.

  2. Select HELP -> Add and Remove Help Content

  3. After Microsoft Help Viewer starts, select Manage Content.

  4. Select Disk under Installation source.

  5. Click the button with three dots to browse files.

  6. Go to the folder where LightningChart® .NET is installed, by default the path is C:\Program Files\LightningChart\LightningChart .NET SDK v.12\MSHelpViewer

  7. Select HelpContentSetup.msha and click Open button.

  8. Next to LightningChart® .NET Help there is Add link. Click it and make sure that Status column value changes to Add pending.

LightningChart help

Adding LightningChart help

  1. Click Update button. If Help Library Manager asks if you want to continue, click Yes button. Help library update begins.

  2. After help library is updated, Microsoft Help Viewer can be closed.

  3. In Visual Studio Menu / Help, select Set Help Preference : Launch in Help Viewer.

Code parameters and tips by Visual Studio IntelliSense

IntelliSense may not show code hints when typing LightningChart related code, if the LightningChart.dll file is referenced from Global Assembly Cache and the controls are not installed by the automatic toolbox installer. Remove the LightningChart.dll file from References list of the project. Then add it again by browsing from the install directory (typically C:\Program Files\LightningChart\LightningChart .NET SDK v.12\LibNETFramework or LibNET).

Using LightningChart® .NET libraries

In order to use LightningChart® .NET components, LightningChart .dll -files have to be added to references. These can be found in the installation folder. The following assemblies are required when developing an application:

WinformsLightningChart.WinForms.Charting.NET4.dll.
WPF Non-bindableLightningChart.Wpf.Charting.NET4.dll
LightningChart.DirectX.dll
WPF BindableLightningChart.Wpf.ChartingMVVM.NET4.dll
LightningChart.DirectX.dll
UWP ChartLightningChart.Uwp.ChartingMVVM.dll
If using SignalToolsLightningChart.WinForms.SignalTools.NET4.dll or
LightningChart.Wpf.SignalTools.NET4.dll or
LightningChart.UWP.SignalTools.dll

When using .NET8 assemblies, NET4 is changed to NET8. Otherwise, the names are the same.

If the above references are added, building the project will automatically copy all the required assemblies to the output folder. Page shows what assemblies are needed when deploying a LightningChart application.

LightningChart.DirectXFilesNET.dll is not automatically included as reference, as it is a large file which can increase the initialization time. It is only needed when there are no correct DirectX assemblies already in the system. LightningChart.DirectXInitNET.dll routines check the existing dlls and loads them when necessary. When loaded once, it writes the DirectX-dlls into Windows temp folder where LightningChart can access them in the future, thus making the initialization fast.

We recommend not to include LightningChart.DirectXFilesNET.dll as a reference, instead, copy it next to your exe.